package com.ethink.mdm.facade.impl;

import com.ethink.mdm.api.CustomerFacade;
import com.ethink.mdm.api.SupplierFacade;
import com.ethink.mdm.api.info.CustomerInfo;
import com.ethink.mdm.api.info.SupplierInfo;
import com.ethink.mdm.common.mapper.CustomerQueryMapper;
import com.ethink.mdm.common.mapper.SupplierQueryMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Facade接口实现
 *
 * @author default
 * @date 2022-10-31
 */
@RestController
@Slf4j
@RequestMapping("mdm-service/facade/v1/customer")
public class CustomerFacadeImpl implements CustomerFacade {

    @Autowired
    private CustomerQueryMapper customerQueryMapper;

    @Override
    public List<CustomerInfo> listCustomer() {
        return customerQueryMapper.listCustomer();
    }

    @Override
    public List<CustomerInfo> listCustomerByCodeList(List<String> codeList) {
        return customerQueryMapper.listCustomerByCodeList(codeList);
    }
}